//跑步_循环问题
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int months[]= {0,31,28,31,30,31,30,31,31,30,31,30,31};
	int w = 6;
	int ans = 0;
	for(int month = 1;month<=12;month++)
	{
		for(int day = 1;day<=months[month];day++)
		{
			if(w==6 || w==0 || day==11 || day==21 || day==31 || day==1 )
				ans++;
			w++;
			w=w%7;

		}
	}
	cout<<ans;
	return 0;
}
